﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="admin/css/login/login.css" rel="stylesheet" />
    <script src="admin/Scripts/jquery-1.11.2.min.js"></script>
    <script src="admin/Scripts/ComFunJS.js?ver=20161220"></script>
    <script src="admin/Scripts/jquery.qrcode.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".content .con_right .left").click(function (e) {
                $(this).css({ "color": "#333333", "border-bottom": "2px solid #2e558e" });
                $(".content .con_right .right").css({ "color": "#999999", "border-bottom": "2px solid #dedede" });
                $(".content .con_right ul .con_r_left").css("display", "block");
                $(".content .con_right ul .con_r_right").css("display", "none");
                //if (fluCodeInterval == null || fluCheckCodeInterval == null) {
                //    show();
                //    flushQRCode();
                //    checkQRCodeStatus();
                //}
            });
            $(".content .con_right .right").click(function (e) {
                $(this).css({ "color": "#333333", "border-bottom": "2px solid #2e558e" });
                $(".content .con_right .left").css({ "color": "#999999", "border-bottom": "2px solid #dedede" });
                $(".content .con_right ul .con_r_right").css("display", "block");
                $(".content .con_right ul .con_r_left").css("display", "none");
            });



            $('#btn_Login').click(function () {
                if ($.trim($('#userid').val()) == '') {
                    alert('请输入您的用户名');
                    return false;
                } else if ($.trim($('#pwd').val()) == '') {
                    alert('请输入密码');
                    return false;
                }
                var data = {
                    P1: $.trim($('#userid').val()),
                    P2: $.trim($('#pwd').val())
                };

                $.post("/API/API.ashx?action=BASE_LOGIN", data, function (result) {
                    var r = JSON.parse(result);
                    if (r.error == "") {
                        ComFunJS.saveToken(r.result);
                        window.location.replace("admin/index.html");
                    } else {
                        $("#btn_Login").css("display", "block");
                        $(".sui-loading").css("display", "none");
                        alert(r.error);
                    }

                })
            });

            //$("#flushLoginValiCode1,#flushLoginValiCode2").click(function () {
            //    $("#loginImgCode").attr("src", "/handler/GetLoginCode.ashx?" + Math.random());
            //});

            var murl = "http://" + window.location.host + "/mobile/login.html";

            $("#output").qrcode({
                render: "table", //table方式
                width: 180, //宽度 
                height: 180, //高度 
                text: murl  //任意内容 
            });

        })
    </script>
    <title>管理中心登录</title>
</head>
<body style="overflow:hidden">
    <div class="pagewrap">
        <div class="main">
            <div class="header"></div>
            <div class="content">
                <div class="con_left"></div>
                <div class="con_right">
                    <div class="con_r_top"><a href="javascript:;" class="left" style="color: rgb(153, 153, 153); border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(222, 222, 222);">手机端登录</a> <a href="javascript:;" class="right" style="color: rgb(51, 51, 51); border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(46, 85, 142);">电脑端管理</a></div>
                    <ul>
                        <li class="con_r_left" style="display: none;">
                            <div class="erweima">
                                <div class="qrcode">
                                    <div id="output" style="width: 100%; position: relative">
                                        
                                    </div>
                                </div>
                            </div>
                            <div style="height: 70px">
                                <p>手机扫码登录</p>
                            </div>
                        </li>


                        <li class="con_r_right" style="display: block;">
                            <div class="user">
                                <div>
                                    <span class="user-icon"></span>
                                    <input type="text" id="userid" name="userid" placeholder="输入账号" value="" maxlength="20">
                                </div>
                                <div>
                                    <span class="mima-icon"></span>
                                    <input type="password" id="pwd" name="pwd" placeholder="输入密码" value="" maxlength="20">
                                </div>

                                <!-- <div><span class="yzmz-icon"></span>
                                    <input id="vdcode" type="text" name="validate" placeholder="验证码" value="" maxlength="4" style=" width:150px;">　　

                                    <img style="cursor: pointer; margin-top:8px;" alt="看不清？点击更换" src="./网站后台管理系统_files/yanzhengma.jpg">



                                </div>	-->

                            </div><br>
                            <div class="sui-loading loading-inline" style="margin-left:200px;display:none;"><i class="sui-icon icon-pc-loading"></i></div>
                            <button id="btn_Login" type="button">登 录</button>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

</body>
</html>
